#include <iostream>
#include <thread>
#include <vector>
#include <mutex>
using std::cout;
using std::endl;

void Print(int n, int i)
{
    for(; i < n; i ++)
    {
        std::cout << std::this_thread::get_id() << " : " << i << std::endl;
    }
    cout << endl;
}

//多核
int main()
{
    std::thread t1(Print, 10, 0);
    std::thread t2(Print, 20, 10);
    t1.join();
    t2.join();
    return 0;
}